package reusingclass;


public class Exercise18 {

	public static final String s1 = new String("hello");
	public final String s2 = new String("world");
	
	public static void main(String[] args) {
		System.out.println(Exercise18.s1);
//		System.out.println(Exercise18.s2); //can't be executed
		Exercise18 ex = new Exercise18();
		System.out.println(ex.s1 + ex.s2);
		Exercise18 ex1 = new Exercise18();
		System.out.println(ex1.s1 + ex1.s2);
		
		System.out.println(ex.s2 == ex1.s2);
		System.out.println(ex.s2.equals(ex1.s2));
		System.out.println(ex.s1 == ex1.s1);
		
	}

}
